﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;

namespace Simple.Services;

public class QHSEViolationUserModel : ModelBase
{
    
    /// <summary>
    /// 违章人员ID
    /// </summary>
    [MaxLength(32)]
    public string ViolationUserId { get; set; } = "";
    /// <summary>
    /// 违章人员单位名称
    /// </summary>
    [MaxLength(1000)]
    public string? ViolationUserDepart { get; set; } = "";

    /// <summary>
    /// 违章岗位
    /// </summary>
    [MaxLength(32)]
    public string Position { get; set; } = "";
    /// <summary>
    /// 违章岗位
    /// </summary>
    public string PositionCode { get; set; } = "";

    /// <summary>
    /// 违章人员工号
    /// </summary>
    [MaxLength(100)]
    public string? Erp { get; set; }

    /// <summary>
    /// 年龄
    /// </summary>
    [MaxLength(32)]
    public string Age { get; set; } = "";
    /// <summary>
    /// 年龄
    /// </summary>
    [MaxLength(32)]
    public string AgeCode { get; set; } = "";

    /// <summary>
    /// 工龄
    /// </summary>
    [MaxLength(32)]
    public string WorkYears { get; set; } = "";
    /// <summary>
    /// 工龄
    /// </summary>
    [MaxLength(32)]
    public string WorkYearsCode { get; set; } = "";

    /// <summary>
    /// 用工性质
    /// </summary>
    [MaxLength(32)]
    public string EmployeeType { get; set; } = "";
    /// <summary>
    /// 用工性质
    /// </summary>
    [MaxLength(32)]
    public string EmployeeTypeCode { get; set; } = "";
    public override void ConfigureMapper(Profile profile)
    {
        profile.CreateMap<QHSESysViolationUser, QHSEViolationUserModel>()
            .ForMember(d => d.ViolationUserId, options => options.MapFrom(s => s.ViolationUserId));

        profile.CreateMap<QHSEViolationUserModel, QHSESysViolationUser>()
            .ForMember(d => d.ViolationUserId, options => options.MapFrom(s => s.ViolationUserId));
    }
}
